﻿@model TaskManager_WCG.Models.Task

@{
    ViewBag.Title = "添加任务";
}

<h2>添加任务</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    <div class="form-group">
        @Html.LabelFor(model => model.TaskPriority, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            <label class="radio-inline">
                <input type="radio" value="1" name="TaskPriority" checked />高
            </label>
            <label class="radio-inline">
                <input type="radio" value="2" name="TaskPriority" />中
            </label>
            <label class="radio-inline">
                <input type="radio" value="3" name="TaskPriority" />低
            </label>
        </div>
    </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.uid, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                                    @*"数据源名称",null,css样式 *@
                @Html.DropDownList("uid", null,new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.uid, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="添加" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("返回主页", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
